package com.learn.spring.ioc.way.proxy.jdk.dynamicProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvocationHandler implements InvocationHandler {
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("enhance " + method.getName());
        method.invoke(new Cat(), args);
        return proxy;
    }
}
